package com.chj.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.chj.entity.Order;

public interface OrderDAO {

    //获取订单
    public Order get(String orderId);

    //保存订单
    public int save(Order order);

    //删除订单
    public int deleteBuOrderId(String orderId);

    //修改订单
    public int modify(Order order);

    //判断存储性
    public boolean isExist(String orderId);

    //查询通过Id
    public List<Order> queryOrderByUserId(String userId);

    //通过限制条件查询订单
    public List<Order> queryOrderByUserIdWtihCondition(Map<String, Object> queryMap,String UserId);

    //通过时间以及订单表查询对应的汽车状态
    public boolean queryECarStatus(String ecarId, Date newDate);

    //通过充电时间查询对应的车位状态
    public boolean queryParkStatus(String networkId
    						     , String parkId
    						     , String chargeTimeBegin
    						     , String chargeTimeEnd);

    //查询大约等待时间
	public Date queryParkWaitTime(String networkId
			                    , String parkId
			                    , String chargeTimeBegin
			                    , String chargeTimeEnd);

    public List<Order> getOrderByUserIdByNow(String userPk, String dateString);

    public List<Order> getOrderByUserIdByNowOver(String userPk,String dateString);

    //管理员后台查看订单
    public List<Order> getOrderListBy(String userName
                                    , String orderId
                                    , String createDateFrom
                                    , String createDateTo
                                    , int page
                                    , int rows);

    //管理员后台查看订单条数
    public int getOrderListBy(String userName
                            , String orderId
                            , String createDateFrom
                            , String createDateTo);

    public boolean queryECarStatusBy(String ecarPk, String chargeTimeBegin, String chargeTimeEnd);

}
